package model

import (
	"fmt"
	"hotel_3.27/variable"
)

func Migrate() {
	err := variable.DB.AutoMigrate(&User{}, &Order{}, &Hotel{}, &HotelAttribute{})
	if err != nil {
		fmt.Println("数据迁移失败")
		return
	} else {
		fmt.Println("数据迁移成功")
	}
}
